/*
 *  DBLexer.h
 *  parser
 *
 *  Created by Daniel Braun on 04/05/07.
 *  Copyright 2007 __MyCompanyName__. All rights reserved.
 *
 */


#import <Cocoa/Cocoa.h>
@class _LexerTok;
@interface DBLexerTokenMatch : NSObject {
@public
	//int tokval;
	NSString *matchString;
	_LexerTok *tokdef;
}
- (id) initWithTokDef:(_LexerTok *)t string:(NSString *)v;
+ (id) tokmatchWithTokDef:(_LexerTok *)t string:(NSString *)v;
+ (id) eofToken;
- (int) tokval;
- (NSString *) astdef;
- (NSString *)matchString;
- (BOOL) isEof;

@end

@interface DBLexer : NSObject {
	NSString *buffer;
	int index;
	BOOL _eof;
	NSMutableArray *tokens;
}

//- (void) addSeparators:(NSCharacterSet *)sep;
- (void) addToken:(id)tokval value:(int)v ast:(NSString *)astdef;
- (void) addToken:(id)tokval value:(int)v ;

- (NSArray *) parseString:(NSString *)str;

@end
